package com.hyfrogx.modules.job.task;

import com.hyfrogx.modules.zoom.service.HyZoomReserveService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author ：Li9527
 * @date ：Created in 2019-11-18 10:05
 * @description：${description}
 * @modified By：
 * @version: 1.0.0
 */
@Slf4j
@Component("zoomReserveTask")
public class ZoomReserveTask {

    @Autowired
    HyZoomReserveService zoomReserveService;

    /**
     * 定时任务,每三分钟检索一次有没有预约会议室的订单,是今天的,并且时间已经大于要生效的时间,并且还处于未使用状态
     */
    public void reserve(){
        log.info("开始检查预约会议室的订单");
        zoomReserveService.reserve();
        log.info("检查完毕");
    }


    /**
     * 定时任务,每天23.59分进行会议室绑定解锁
     */
    public void cancelReserv(){
        log.info("开始检查需解绑会议室");
        zoomReserveService.cancelReserv();
        log.info("解绑完毕");
    }



}
